Convert a date to the timestampΒΆ
Convert a date to the timestamp.
import time
import datetime
now = datetime.datetime.now() # datetime.datetime(2018, 10, 15, 7, 22, 26, 500868)
print(time.mktime(now.timetuple()))
Output:
1539584546.0